import request from '@/utils/request'

const PATH = '/sys/roles'

export function pageRolesREQ(params) {
  return request({
    url: PATH,
    method: 'get',
    params
  })
}

export function createRolesREQ(data) {
  return request({
    url: PATH,
    method: 'post',
    data
  })
}
export function getRolesByIdREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'GET'
  })
}

export function updateRolesREQ(data) {
  return request({
    url: PATH,
    method: 'put',
    data
  })
}

export function deleteRolesREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'delete'
  })
}

export function findRolesREQ(id) {
  return request({
    url: `${PATH}/find`,
    method: 'GET'
  })
}

